package hangzhou;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;

import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import org.hibernate.*;
import org.hibernate.Transaction;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
public class deleteservlet extends HttpServlet{
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		userDAO ud = new userDAO();
		String sid=req.getParameter("id");
		String currPage=req.getParameter("currPage");
		req.setAttribute("currPage", currPage);
		System.out.println("del"+sid);
		int id=Integer.parseInt(sid);
		List<denglu> list=ud.del(id);
		req.getRequestDispatcher("pageQuery").forward(req, resp);
	}
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req,resp);
	}
}
